package com.qf.day07.boss;

import java.util.Random;

public class Demo {
    public static void main(String[] args) {
        weapons sword = new Sword();
        weapons dagger = new dagger();
        Random random = new Random();

        System.out.println(sword.toString());
        for (int j = 0; j < 5; j++) {
            int i = random.nextInt(2);
//            System.out.println(i);  //随机0还是1
            if (i==0) {
                Sword cj = (Sword) sword;
                System.out.println(cj.cj());
            }else {
                System.out.println("匕首");
            }
        }

    }
}
